# $Id: PKGBUILD 148749 2012-02-05 11:49:07Z ibiru $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor:  Jan de Groot <jan@archlinux.org>

_pkgname=gnome-desktop
pkgname=${_pkgname}2
pkgver=2.32.1
pkgrel=2
pkgdesc="Library with common API for various GNOME modules (legacy version)"
arch=(i686 x86_64)
license=(GPL LGPL)
depends=(gconf gtk2 startup-notification)
makedepends=(gnome-doc-utils intltool)
url="http://www.gnome.org"
options=(!libtool !emptydirs)
source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2)
sha256sums=('55cbecf67efe1fa1e57ac966520a7c46d799c8ba3c652a1219f60cafccb3739d')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static \
      --with-gnome-distributor="Archlinux" \
      --disable-scrollkeeper \
      --disable-gnome-about --disable-desktop-docs

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool

  make
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
}
